import java.util.Arrays;

public class Code {
    public static void main(String[] args) {

    }
    public static void swap (MyValue myValue1,MyValue myValue2){
        int temp = 0;
        temp = myValue1.value;
        myValue1.value = myValue2.value;
        myValue2.value = temp;
    }
    public static void main5(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.value = 10;
        MyValue myValue2 = new MyValue();
        myValue2.value = 20;
        System.out.println("交换前 ：" + myValue1.value + " " + myValue2.value);
        swap(myValue1,myValue2);
        System.out.println("交换后 ：" + myValue1.value + " " + myValue2.value);

    }
    public static void main4(String[] args) {
        MyDate myDate = new MyDate();
        myDate.setDate(2025,5,25);
        System.out.println(myDate);
    }
    public static void main3(String[] args) {
        Dog dog1 = new Dog();
        dog1.name  = "旺财";
        dog1.age = 6;
        System.out.println(dog1);
        dog1.bark();
        dog1.eat();
        dog1.bark();
        Dog dog2 = new Dog();
        dog2.name = "荣家";
        dog2.age = 8;
        System.out.println(dog2);

        dog2.bark();
        dog2.eat();
        dog2.bark();
    }
    public static void main2(String[] args) {
        int[][] array = new int[2][];
        array[0] = new int[]{1,2,3};
        array[1] = new int[5];
        for(int i = 0; i < array.length; i++){
            for(int j = 0; j < array[i].length; j++){
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
        System.out.println();
        for(int[] x : array){
            for(int z : x){
                System.out.print(z + " ");
            }
            System.out.println();
        }
        String ret = Arrays.deepToString(array);
        System.out.println(ret);

    }
    public static void main1(String[] args) {
        int[][] array = {{1,2,3},{3,4,5}};
        for(int i = 0 ; i < array.length ; i++){
            for(int j = 0 ; j < array[i].length ; j++ ){
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
        System.out.println();
        for(int[] x : array){
            for(int z : x){
                System.out.print(z + " ");
            }
            System.out.println();
        }
        System.out.println();
        String ret = Arrays.deepToString(array);
        System.out.println(ret);
    }
}
